import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import axios  from 'axios'

import d2 from '../src/assets/css/style-811b728cee.css'
import d1 from '../src/assets/css/index-8b6647dc47.page.css'
import d3 from '../src/assets/css/yxComponent.all.min.css'
import d4 from '../src/assets/css/grayscale.css'


Vue.config.productionTip = false

axios.defaults.baseURL = 'http://localhost:58360/api/'
// axios 拦截器 不是必须的
axios.interceptors.request.use(config => {
  // console.log(config)
  // 给请求时加上一个header信息名字叫Authorization
  config.headers.Authorization = window.sessionStorage.getItem('token')
  // 在最后必须 return config
  return config
})
// 给vue原型加入axios  $http自己取的名，可以改
Vue.prototype.$http = axios


new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
